
#include "timer.h"
#include "simulator.h"

void TimerHandler::sched( sim_time_t delay )
{
	assert_or_ret( TIMER_IDLE==status_ );
	Simulator::instance().scheduleTimer( timer_, delay );
}

//TODO: cancel previous timer if status is TIMER_PENDING
void TimerHandler::resched( sim_time_t delay )
{
	assert_or_ret( TIMER_IDLE==status_ );
	Simulator::instance().scheduleTimer( timer_, delay );
}



